package com.example.zbh.dsliao.ui.activty;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;

/**
 * Created by zbh on 15/11/19.
 */
public abstract class BaseFragmentActivity extends FragmentActivity {
    protected <T extends View> T findeView(int resd){
        return (T) findViewById(resd);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initPresenter();
        setContentView(getLayOut());
        initView();
        initData();
    }

    protected void initPresenter() {
    }
    protected  abstract int getLayOut();//加载布局
    protected  abstract void initView();//初始化控件
    protected  abstract void initData();//舒适化数据

}
